using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
using System.ComponentModel;
using Microsoft.SharePoint.Utilities;
using System.Linq;
using System.Collections.Generic;
namespace ConceptInc.Public.WebPart.UI.WebParts.ListQueryFeature
{
    public class ListQueryWebPart : System.Web.UI.WebControls.WebParts.WebPart, IWebEditable
    {
        public string Property1
        {
            get
            {
                return _property1;
            }
            set
            {
                _property1 = value;
            }
        }
        string _property1;
        public string Property2
        {
            get
            {
                return _property2;
            }
            set
            {
                _property2 = value;
            }
        }
        string _property2;

        protected override void Render(HtmlTextWriter writer)
        {
            base.Render(writer);
            writer.Write(Property1);
            writer.Write("<br/>");
            writer.Write(Property2);
        }
        //public override ToolPart[] GetToolParts()
        //{
        //    ToolPart[] toolpart = new ToolPart[2];
        //    WebPartToolPart wpt = new WebPartToolPart();
        //    toolpart[0] = wpt;
        //    toolpart[1] = new ListQueryWebPartEditor();
        //    return toolpart;
        //}
        #region IWebEditable Members

        EditorPartCollection IWebEditable.CreateEditorParts()
        {
            List<EditorPart> editors = new List<EditorPart>();
            editors.Add(new ListQueryWebPartEditor(this.ID));
            return new EditorPartCollection(editors);
        }

        object IWebEditable.WebBrowsableObject
        {
            get { return this; }
        }

        #endregion
    }
}
